package com.bookstore.Domain;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @author 未来
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Announcement {

    @TableId(type = IdType.AUTO)
    private int id;
    @ApiModelProperty("公告信息")
    private String msg;

    /**
     * 设置自动填充：sql语句
     */
    @TableField(fill = FieldFill.INSERT)
    private Date gmt_create;

    /**
     * 逻辑删除： UPDATE user SET deleted=1 WHERE name = ? AND deleted=0
     * 查询的时候会自动过滤删除过的字段***
     */
    @TableLogic
    private Integer deleted;

}
